﻿<?php 
class Form_MessagesForm extends Zend_Form
{
	public function init()
	{
		$email = $this->createElement('text', 'guitoi');
        $email->setLabel('Gửi tới:');
        $email->setRequired('TRUE');
        $email->addValidator(new Zend_Validate_EmailAddress()); 
        $email->addFilters(array(new Zend_Filter_StringTrim() , new Zend_Filter_StringToLower()));
        $email->setAttrib('size', 40);
		$email->addErrorMessage('Email không được để trống!');
        $this->addElement($email);
		 
		 
		 $hoten = $this->createElement('text','tieude');
        $hoten->setLabel('Tiêu đề: ');
        $hoten->addFilter('StripTags');
		$hoten->setAttrib('size', 50);
		//	$hoten->setDecorators();
        $this->addElement($hoten);
	
		$this->addElement('textarea','noidung',array(
				'label'      => 'Nội dung:',
		));	

		$submit = $this->addElement('submit', 'submit', array('label' => 'Gửi tin'));
	
	}
}